import { Component ,OnInit} from '@angular/core';
import { appService } from '../../../../my-service/app.service';
import { canvasmsg } from '../canvasmsg';
import { fadeIn } from '../../../../animate';
import { UtilService } from '../../../../my-service/util.service';
import { DomSanitizer } from '@angular/platform-browser';
@Component({
  selector: 'explain-root',
  templateUrl: './explain.component.html',
  styleUrls: ['./explain.component.css'],
  animations: [fadeIn]
})
export class explainComponent implements OnInit{
  FK_CanvasGuid
  img
  name
  english
  constructor(private appservice: appService,private sanitizer: DomSanitizer,private UtilService:UtilService) {
    this.FK_CanvasGuid=this.UtilService.canvas().guid
    this.img=this.UtilService.canvas().img
    this.name=this.UtilService.canvas().name
    this.english=this.UtilService.canvas().english
  }
  canvasmsg:canvasmsg={
    BackGroundImg:'',
    Canvaschoose:"每组或每人一张",
    Description:'加载中',
    Developer:"舟道科技",
    ID:0,
    Imgurl:'',
    Logo:'',
    MainRatio:0.517,
    Name:'加载中',
    PK_CanvasGuid:'',
    Packetmode:'个人或分组',
    SmallImgurl:'',
    Status:1,
    Type:'',
    Updatetime:'',
    Usages:'',
    Usagescenario:"任何场景",
    Versions:'1.0',
    EnglishName:''
  };
  msgload=false;

  ngOnInit() {
    this.appservice.getcanvas(this.FK_CanvasGuid).then(re=>{
      this.canvasmsg=re
    }).then(re=>{
      this.msgload=true;
    })
   }
   innerH5(PurchaseMethod) {
    return this.sanitizer.bypassSecurityTrustHtml(PurchaseMethod)
  }
}
